import pygame
from types import SimpleNamespace
from common import (
    white,
    black,
    font_path,
    get_score,
)

screen_width, screen_height = 800, 450


def draw(screen):
    global selected, score
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            exit()

    # 绘制背景
    screen.fill(white)
    # 绘制title
    font = pygame.font.Font(font_path, 40)
    text = font.render(
        f"您的最终总得分为（{get_score()}）",
        True,
        black,
    )
    text_rect = text.get_rect(center=(screen_width // 2, screen_height // 2))
    
    screen.blit(text, text_rect)